package com.maretska.empat;

import org.junit.Test;

public class Main {
	KulkasII panasonic, sharp, Toshiba;
	
	@Test
	public void tryMe(){
		TruckII truck = new TruckII();
		truck.kulkas.add(panasonic = new KulkasII("Panasonic"));
		truck.kulkas.add(sharp = new KulkasII("Sharp"));
		truck.kulkas.add(Toshiba = new KulkasII("Toshiba"));
		panasonic.melon.add(new WatermelonII("Merah"));
		sharp.melon.add(new WatermelonII("HIjau"));
		sharp.melon.add(new WatermelonII("Hitam"));
		Toshiba.melon.add(new WatermelonII("Hijau Tua"));
		Toshiba.melon.add(new WatermelonII("Kuning"));
		
		for (int i=0 ;i<truck.kulkas.size();i++){
			System.out.println("Didalam kulkas bermerek : " +truck.kulkas.get(i).namaKulkas);
			for (int x=0;x<truck.kulkas.get(i).melon.size();x++){
			System.out.println("  - Ada Semangka berwarna : " +truck.kulkas.get(i).melon.get(x).warnaMelon);
			}
		}
	}
}
